package com.jacen.fzxs.service.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jacen.fzxs.dao.IBaseDao;
import com.jacen.fzxs.dao.IImageDao;
import com.jacen.fzxs.entity.ImageEntity;
import com.jacen.fzxs.service.IImageService;

/**
 * 图片Service
 * @author Jacen
 *
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ImageService extends BaseService<ImageEntity> implements IImageService {
	
	@Resource
	private IImageDao imageDao;
	
	@Override
	public IBaseDao<ImageEntity> getDao() {
		// TODO Auto-generated method stub
		return imageDao;
	}

	@Transactional(readOnly=true)
	public List<Map<String, Object>> getPage(int curPage, int pageSize, Map<String, String> params) {
		// TODO Auto-generated method stub
		return imageDao.getPage((curPage - 1) * pageSize, pageSize, params);
	}

	@Transactional(readOnly=true)
	public long getCount(Map<String, ? extends Object> paramMap)
			throws SQLException {
		return imageDao.getCount(paramMap);
	}

	@Override
	public List<ImageEntity> getList(String wid) {
		return imageDao.getList(wid);
	}


}
